package ua.yandex.skipasssystem.skipass;

import java.time.DayOfWeek;
import java.time.LocalDate;
import java.util.EnumMap;

public abstract class WithDaysOfWorkSkiPass extends SkiPass
        implements DaysOfWorkInterface {
    private EnumMap<DayOfWeek, Boolean> daysOfWork;

    WithDaysOfWorkSkiPass(long id,
                          LocalDate fromDate,
                          LocalDate toDate,
                          EnumMap<DayOfWeek, Boolean> daysOfWork) {
        super(id, fromDate, toDate);
        this.daysOfWork = daysOfWork;
    }

    public boolean isWorkAtDay(DayOfWeek day) {
        return daysOfWork.get(day);
    }

    @Override
    public EnumMap<DayOfWeek, Boolean> getDayOfWork() {
        return daysOfWork;
    }
}
